Method, device for machine processing trajectory space detection and numerical control machine

ABSTRACT

The present disclosure provides a method, devices, a numerical control machine, and a computer storage medium for detecting machine processing trajectory space. The method includes: obtaining data of a trajectory AB of a machine processing and spatial data of a specified space area; converting a function of the data of the trajectory AB into a univariate function P=f (u) with respect to a trajectory parameter u; determining a point set U i  of the trajectory AB on an inner side of each curved surface S i  based on spatial data of the individual curved surfaces S i  forming the specified space area and the function P=f(u); and determining a positional relationship between the trajectory AB and the specified space area based on the point sets U i .

TECHNICAL FIELD

Embodiments of the present disclosure generally relate to machineprocessing application technology, and in particular relate to a method,devices and a numerical control machine for detecting machine processingtrajectory space.

BACKGROUND

In the process of machine processing, in order to prevent the tool orthe arm from colliding and causing safety problems during the motion ofmachine processing, an area (usually a cuboid or a cylinder) isspecified before transmitting a motion instruction to a machine or arobot, so as to indicate that a trajectory is overtravel when thetrajectory exceeds the specified area (in the case that the area is asafe area) or enters the area (in the case that the area is a prohibitedarea), which is a detection process known as safe area detection.

In the prior art, the trajectory is determined to be within thespecified area or outside the specified area through the spatialgeometry algorithm directly, in which the presumed conditions areindividually made based on different positional relationships betweenthe trajectory and the specified area, and then the determination isperformed. Therefore, the algorithm will be quite large, the complexityof the determination of the geometric space relationship willexponentially increases because of the complexity of the geometricshape, and the presumption is likely to miss some possible cases.

SUMMARY

The technical problem to be solved by the present disclosure is toprovide a method, devices, a numerical control machine, and a computerstorage medium for detecting machine processing trajectory space, sothat the analysis based on the relationship between spatial geometriesis not necessary when determining the spatial geometry relationshipbetween a trajectory and a specified space area, which reduces thecomplexity of the algorithm, and improve the flexibility andexpansibility.

In order to solve the above-mentioned problems, the present disclosureprovides a method for detecting machine processing trajectory space. Themethod includes: obtaining data of a trajectory AB of a machineprocessing; obtaining spatial data of a specified space area; convertinga function of the data of the trajectory AB into a univariate functionP=f (u) which is with respect to a trajectory parameter u, where P isany point on the trajectory AB; determining a point set U_(i) of thetrajectory AB on an inner side of each curved surface S_(i) based onspatial data of the individual curved surfaces S_(i) forming thespecified space area and the function P=f (u), where 1≤i≤m, and m is theamount of the curved surface forming the specified space area; anddetermining a positional relationship between the trajectory AB and thespecified space area based on the point sets U_(i).

In one embodiment, the determining the point set U_(i) of the trajectoryAB on the inner side of each curved surface S_(i) based on spatial dataof the individual curved surfaces S_(i) forming the specified space areaand the function P=f (u) includes: utilizing a first inequality asfollows to calculate the point set U_(i) of the trajectory AB on theinner side of each curved surface S_(i):

${\underset{PM}{\rightarrow}{{\times \underset{n}{\longrightarrow}} < 0}};$where, P is any point on the trajectory AB, M is a projection point ofthe point P on the curved surface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M.

In one embodiment, the determining the positional relationship betweenthe trajectory AB and the specified space area based on the point setsU_(i) includes: obtaining an intersection U_(z)=U₁∩U₂ . . . ∩U_(m) ofthe point sets U_(i); and determining that the trajectory AB is on theinner side of all the curved surfaces S_(i) if U_(T)⊂U_(z), so as todetermine that the trajectory AB is on an inner side of the specifiedspace area, where U_(T) is a set of the point sets of the trajectory AB.

In one embodiment, the determining the positional relationship betweenthe trajectory AB and the specified space area based on the point setsU_(i) includes: obtaining an intersection U_(z)=U₁∩U₂ . . . ∩U_(m) ofthe point sets U_(i); and determining that the trajectory AB iscompletely outside the specified space area if U_(z)∩U_(T)=ø, whereU_(T) is a set of the point sets of the trajectory AB.

In order to solve the above-mentioned problems, the present disclosurealso provides a device for detecting machine processing trajectoryspace. The device includes: a first obtaining unit configured to obtaindata of a trajectory AB of a machine processing; a second obtaining unitconfigured to obtain spatial data of a specified space area; aconverting unit configured to convert a function of the data of thetrajectory AB obtained by the first obtaining unit into a univariatefunction P=f (u) which is with respect to a trajectory parameter u,where P is any point on the trajectory AB; a calculating unit configuredto determine spatial data of individual curved surfaces S_(i) formingthe specified space area based on the spatial data of the specifiedspace area obtained by the second obtaining unit, and calculate a pointset U_(i) of the trajectory AB on an inner side of each curved surfaceS_(i) based on the spatial data of the individual curved surfaces S_(i)and the function P=f (u) produced by the converting unit, where 1≤i≤m,and m is the amount of the curved surface forming the specified spacearea; and a position determining unit configured to determine apositional relationship between the trajectory AB and the specifiedspace area based on the point sets U_(i) obtained by the calculatingunit.

In one embodiment, the calculating unit is configured to calculate thepoint set U_(i) of the trajectory AB on the inner side of each curvedsurface S_(i) based on a first inequality as follows:

${\underset{PM}{\rightarrow}{{\times \underset{n}{\longrightarrow}} < 0}};$where, P is any point on the trajectory AB, M is a projection point ofthe point P on the curved surface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M.

In one embodiment, the position determining unit is configured todetermine an intersection U_(z)=U₁∩U₂ . . . ∩U_(n) of the point setsU_(i) based on the point sets U_(i) obtained by the calculating unit,and determine that the trajectory AB is on an inner side of thespecified space area if U_(T)⊂U_(z); where U_(T) is a set of the pointsets of the trajectory AB.

In one embodiment, the position determining unit is configured todetermine an intersection U_(z)=U₁∩U₂ . . . ∩U_(n) of the point setsU_(i) based on the point sets U_(i) obtained by the calculating unit,and determines that the trajectory AB is completely outside thespecified space area if U_(z)∩U_(T)=ø; where U_(T) is a set of the pointsets of the trajectory AB.

In order to solve the above problems, the present disclosure alsoprovides a numerical control machine. The numerical control machineincludes a machine body and a numerical control system installed on themachine body. The numerical control system includes a machine processingtrajectory space detecting module. The machine processing trajectoryspace detecting module includes: a first obtaining unit configured toobtain data of a trajectory AB of a machine processing; a secondobtaining unit configured to obtain spatial data of a specified spacearea; a converting unit configured to convert a function of the data ofthe trajectory AB obtained by the first obtaining unit into a univariatefunction P=f (u) which is with respect to a trajectory parameter u,where P is any point on the trajectory AB; a calculating unit configuredto determine spatial data of individual curved surfaces S_(i) formingthe specified space area based on the spatial data of the specifiedspace area obtained by the second obtaining unit, and calculate a pointset U_(i) of the trajectory AB on an inner side of each curved surfaceS_(i) based on the spatial data of the individual curved surfaces S_(i)and the function P=f (u) produced by the converting unit, where 1≤i≤m,and m is the amount of the curved surface forming the specified spacearea; and a position determining unit configured to determine apositional relationship between the trajectory AB and the specifiedspace area based on the point sets U_(i) obtained by the calculatingunit.

In one embodiment, the numerical control system further includes: analarm module configured to issue an alarm information when thepositional relationship between the trajectory AB and the specifiedspace area determined by the machine processing trajectory spacedetecting module does not meet a predetermined safety relationship.

In order to solve the above problems, the present disclosure alsoprovides a machine processing trajectory space detecting device. Thedevice includes a memory and a processor connected to the memory. Theprocessor is configured to: obtain data of a trajectory AB of a machineprocessing; obtain spatial data of a specified space area; convert afunction of the data of the trajectory AB into a univariate function P=f(u) which is with respect to a trajectory parameter u, where P is anypoint on the trajectory AB; determine a point set U_(i) of thetrajectory AB on an inner side of each curved surface S_(i) based onspatial data of the individual curved surfaces S_(i) forming thespecified space area and the function P=f (u), where 1≤i≤m, and m is theamount of the curved surface forming the specified space area; anddetermine a positional relationship between the trajectory AB and thespecified space area based on the point sets U_(i).

In one embodiment, the processor is further configured to: utilize afirst inequality as follows to calculate the point set U_(i) of thetrajectory AB on the inner side of each curved surface S_(i):

${\underset{PM}{\rightarrow}{{\times \underset{n}{\longrightarrow}} < 0}};$where, P is any point on the trajectory AB, M is a projection point ofthe point P on the curved surface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M.

In one embodiment, the processor is further configured to: obtain anintersection U_(z)=U₁∩U₂ . . . ∩U_(m) of the point sets U_(i); determinethat the trajectory AB is on the inner side of all the curved surfacesS_(i) if U_(T)⊂U_(z), so as to determine that the trajectory AB is on aninner side of the specified space area, where U_(T) is a set of thepoint sets of the trajectory AB.

In one embodiment, the processor is further configured to: obtain theintersection U_(z)=U₁∩U₂ . . . ∩U_(m) of the point sets U_(i); determinethat the trajectory AB is completely outside the specified space area ifU_(z)∩U_(T)=ø, where U_(T) is a set of the point sets of the trajectoryAB.

In order to solve the above-mentioned problems, the present disclosurealso provides a computer storage medium. The computer storage mediumincludes computer program codes, where the computer program codes causea computer processor to execute a machine processing trajectory spacedetecting method when the computer program codes are executed by thecomputer processor. The method includes: obtaining data of a trajectoryAB of a machine processing; obtaining spatial data of a specified spacearea; converting a function of the data of the trajectory AB into aunivariate function P=f (u) with respect to a trajectory parameter u,where P is any point on the trajectory AB; determining a point set U_(i)of the trajectory AB on an inner side of each curved surface S_(i) basedon spatial data of the individual curved surfaces S_(i) forming thespecified space area and the function P=f (u), where 1≤i≤m, and m is theamount of the curved surface forming the specified space area; anddetermining a positional relationship between the trajectory AB and thespecified space area based on the point sets U_(i).

In one embodiment, the determining the point set U_(i) of the trajectoryAB on the inner side of each curved surface S_(i) based on spatial dataof the individual curved surfaces S_(i) forming the specified space areaand the function P=f (u) includes: utilizing a first inequality asfollows to calculate the point set U_(i) of the trajectory AB on theinner side of each curved surface S_(i):

${\underset{PM}{\rightarrow}{{\times \underset{n}{\longrightarrow}} < 0}};$where, P is any point on the trajectory AB, M is a projection point ofthe point P on the curved surface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M.

The disclosure provides a method, devices, numerical control machines,and a computer storage medium for detecting machine processingtrajectory space, which express the spatial curve via a univariatefunction so as to participate in the operation of the space area for thecurve, express the point sets of any portion of the trajectory via thetrajectory parameter set, determines the position of the individualcurved surfaces forming the space area and the trajectory, andeventually determine the positions of the space area and the curve.Consequently, the defect of algorithm explosion caused by the spacegeometry operation which needs to analysis the specific area andstraight line type is overcame, which reduces the quantity ofoperations, and has high reusability.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart of a machine processing trajectory spacedetecting method according to a first embodiment of the presentdisclosure.

FIG. 2 is a flow chart of a machine processing trajectory spacedetecting method according to a second embodiment of the presentdisclosure.

FIG. 3 is a flow chart of a method for determining a positionalrelationship between a trajectory and a specified space area accordingto an embodiment of the present disclosure.

FIG. 4 is a schematic diagram of determining the position of any pointon the trajectory in the case that the trajectory is a straight line.

FIG. 5 is a schematic diagram of determining a point set of thetrajectory on an inner side of a curved surface in the case that thetrajectory is a straight line.

FIG. 6 is a schematic diagram of determining the position of any pointon the trajectory in the case that the trajectory is an arc.

FIG. 7 is a schematic diagram of the relationship between the range of θand the trajectory parameter u.

FIG. 8 is a schematic diagram of determining a point set of thetrajectory on an inner side of a curved surface in the case that thetrajectory is an arc.

FIG. 9 is a schematic diagram of determining the position of any pointon the trajectory in the case that the trajectory is a parabola.

FIG. 10 is a schematic diagram of the structure of a machine processingtrajectory space detecting device according to an embodiment of thepresent disclosure.

FIG. 11 is a schematic diagram of the structure of a numerical controlmachine according to an embodiment of the present disclosure.

FIG. 12 is a schematic diagram of the structure of a numerical controlsystem according to an embodiment of the present disclosure.

FIG. 13 is a schematic diagram of the structure of a machine processingtrajectory space detecting device according to another embodiment of thepresent disclosure.

DETAILED DESCRIPTION

The technical solutions in the embodiments of the present invention willbe described in detail below in connection with the drawings in theembodiments of the present disclosure. Obviously, the describedembodiments are merely part of the embodiments of the presentdisclosure, not all embodiments. Based on the embodiments in the presentdisclosure, all other embodiments can be obtained by those skilled inthe art without making creative work are within the scope of theprotection of the present disclosure.

Referring to FIG. 1, a flow chart of a machine processing trajectoryspace detecting method according to a first embodiment of the presentdisclosure is depicted. The method may include the following blocks.

At S10: obtaining data of a trajectory AB of a machine processing.

At S11: obtaining spatial data of a specified space area.

At S12: converting a function of the data of the trajectory AB into aunivariate function P=f (u) which is with respect to a trajectoryparameter u, where P is any point on the trajectory AB.

At S13: determining a point set U_(i) of the trajectory AB on an innerside of each curved surface S_(i) based on spatial data of theindividual curved surfaces S_(i) forming the specified space area andthe function P=f (u).

Where, 1≤i≤m, and m is the amount of the curved surface forming thespecified space area.

At S14: determining a positional relationship between the trajectory ABand the specified space area based on the point sets U_(i).

Referring to FIG. 2, a flow chart of a machine processing trajectoryspace detecting method according to a second embodiment of the presentdisclosure is depicted. The method may include the following blocks.

At S20: obtaining data of a trajectory AB of a machine processing.

Where, the trajectory AB may be a straight line, an arc, a parabola,etc.

At S21: obtaining spatial data of a specified space area.

Where, any spatial area can enclose a plurality of curved surfaces toform, for example, a cuboid which is formed by enclosing six planes, inwhich normal vectors of the six planes point to the direction of thecenter of the cuboid; a cylinder is which formed by enclosing acylindrical curved surface and two bottom surfaces, in which normalvectors of the two bottom surfaces points to the direction of the centerof the cylinder, and a plane normal vector of the cylindrical curvedsurface points inwardly toward the cylinder.

At S22: converting a function of the data of the trajectory AB into aunivariate function P=f (u) which is with respect to a trajectoryparameter u. Where, P is any point on the trajectory AB.

At S23: determining a point set U_(i) of the trajectory AB on an innerside of each curved surface S_(i) based on spatial data of theindividual curved surfaces S_(i) forming the specified space area andthe function P=f (u).

Where, 1≤i≤m, and m is the amount of the curved surface forming thespecified space area.

For instance, the step S23 can specifically include: utilizing a firstinequality as follows to calculate the point set U_(i) of the trajectoryAB on the inner side of each curved surface S_(i):

the first inequality

$\underset{PM}{\rightarrow}{{\times \underset{n}{\longrightarrow}} < 0}$

where P is any point on the trajectory AB, M is a projection point ofthe point P on the curved surface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M.

At S24: determining a positional relationship between the trajectory ABand the specified space area based on the point sets U_(i).

Referring to FIG. 3, a flow chart of a method for determining apositional relationship between a trajectory and a specified space areaaccording to an embodiment of the present disclosure is depicted. Themethod may include the following blocks.

At S240: obtaining an intersection of the point sets U_(i).

At S241: determining the positional relationship between the trajectoryAB and the specified space area based on the relationship between U_(T)and U_(z). Specifically, if U_(T)⊂U_(z), the trajectory AB is determinedto be on the inner side of all the curved surfaces S_(i), therebydetermining that the trajectory AB is on an inner side of the specifiedspace area. If U_(z)∩U_(T)=ø, the trajectory AB is determined to becompletely outside the specified space area. Where, U_(T) is a set ofthe point sets of the trajectory AB.

Referring to FIGS. 4 and 5, in which the present disclosure will bedescribed in detail below with the trajectory AB as a straight line.

In the case that the trajectory AB corresponding to the obtained data isa straight line, any point on the trajectory AB is assumed as P. Where,the point A is a start point of the trajectory AB, and the point B is anend point of the trajectory AB. The trajectory parameter u is directlyproportional to the distance between the point P and the start point A,and the value of the trajectory parameter u is 0 when the point Pcoincides with the point A.

At this time, the univariate function P=f (u) can be expressed as:

$\begin{matrix}{P = {{A + {u \times}}\underset{k}{\rightarrow}}} & (1)\end{matrix}$

Where,

is a unit direction vector of the straight line AB. In the case that thetrajectory parameter u is zero, the position of the point P is theposition of the start point A. In the case that the trajectory parameteru is positive, the position of a point which the start point A points tothe direction of the unit direction vector

is the position of the point P; when the track parameter u is negative,the position of a point which the start point A points to a directioncontrary to the unit direction vector

is the position of the point P.

Furthermore, M is a projection point of the point P on the curvedsurface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M. According to the formula (1):

$\begin{matrix}{\underset{PM}{\rightarrow}{= {{{A + {u \times}}\underset{k}{\rightarrow}{- M}} = {\underset{MA}{\rightarrow}{{{+ u} \times}\underset{k}{\rightarrow}}}}}} & (2)\end{matrix}$

Therefore, based on the first inequality and the formula (2), a pointset of the straight line AB on a side of the normal vector

satisfies the following inequality:

$\begin{matrix}{\underset{MA}{\rightarrow}{\times {\underset{n}{\rightarrow}{{+ {u\left( {\underset{k}{\rightarrow}{\times \underset{n}{\rightarrow}}} \right)}} < 0}}}} & (3)\end{matrix}$

The range of the trajectory parameter u, that is, the point set U_(i) ofthe straight line AB on the inner side of the surface S_(i), is obtainedby solving the inequality (3).

Referring to FIG. 6, FIG. 7, and FIG. 8, in which the present disclosurewill be described in detail below with the trajectory AB as an arc.

In the case that the trajectory AB corresponding to the obtained data isan arc, an arc from the start point A to the end point B which is in acounterclockwise direction is assumed as the arc AB, while O is thecenter of a circle where the arc AB is, and R is the radius of thecircle O. The position of P is obtained by rotating a vector

counterclockwise for an angle α with O as the center and R as theradius. Assuming that a unit vector in the direction of the vector

is

, a unit vector rotated for 90° along the rotation direction of the arcAB (i.e., counterclockwise) is

and θ=α−90°, the position of the point P can be expressed as:

$\begin{matrix}{P = {O + {R\left( {\underset{x}{\rightarrow}{{{\cos\;\theta} +}\underset{y}{\rightarrow}{\sin\;\theta}}} \right)}}} & (4)\end{matrix}$

Furthermore, a cosine value cos θ of the angle θ is calculated based onthe coordinate of the point P and the formula (4), and the trajectoryparameter u can be expressed using the cosine value cos θ based on therange of 0:

$\begin{matrix}{u = \left\{ \begin{matrix}{{{{- \cos}\;\theta} + 1},} & {0 < \theta < \pi} \\{{{\cos\;\theta} + 3},} & {\pi < \theta < {2\;\pi}}\end{matrix} \right.} & (5)\end{matrix}$

The position of the point P is determined based on the formula (4) and(5):

$\begin{matrix}{{{{if}\mspace{14mu} 0} < \theta < \pi},{P = {O + {R\left( {\underset{x}{\rightarrow}{{\left( {1 - u} \right) +}\underset{y}{\rightarrow}\sqrt{1 - \left( {1 - u} \right)^{2}}}} \right)}}}} & (6) \\{{{{if}\mspace{14mu}\pi} < \theta < {2\pi}},{P = {O + {R\left( {\underset{x}{\rightarrow}{{\left( {u - 3} \right) +}\underset{y}{\rightarrow}\sqrt{1 - \left( {u - 3} \right)^{2}}}} \right)}}}} & (7)\end{matrix}$

Furthermore, assuming that the point M is a projection point of thepoint P on the curved surface S_(i),

is the normal vector of the surface S_(i) pointing to the inner side ofthe specified space area, and

passes through the point M, according to the formulas (6) and (7):

$\begin{matrix}{{{{If}\mspace{14mu} 0} < \theta < \pi},{\underset{PM}{\rightarrow}{= {{O + {R\left( {\underset{x}{\rightarrow}{{\left( {1 - u} \right) +}\underset{y}{\rightarrow}\sqrt{1 - \left( {1 - u} \right)^{2}}}} \right)} - M} = {\underset{MO}{\rightarrow}{+ {R\left( {\underset{x}{\rightarrow}{{\left( {1 - u} \right) +}\underset{y}{\rightarrow}\sqrt{1 - \left( {1 - u} \right)^{2}}}} \right)}}}}}}} & (8) \\{{{{If}\mspace{14mu}\pi} < \theta < {2\pi}},{\underset{PM}{\rightarrow}{= {{O + {R\left( {\underset{x}{\rightarrow}{{\left( {u - 3} \right) +}\underset{y}{\rightarrow}\sqrt{1 - \left( {u - 3} \right)^{2}}}} \right)} - M} = {\underset{MO}{\rightarrow}{+ {R\left( {\underset{x}{\rightarrow}{{\left( {u - 3} \right) +}\underset{y}{\rightarrow}\sqrt{1 - \left( {u - 3} \right)^{2}}}} \right)}}}}}}} & (9)\end{matrix}$

Therefore, the point set of the arc AB on the side of the normal vector

is determined to satisfy the following inequality based on the firstinequality and the formula (8) and (9):

$\begin{matrix}{{{{If}\mspace{14mu} 0} < \theta < \pi},{\underset{MO}{\rightarrow}{\times {\underset{n}{\rightarrow}{{+ {R\left( {{\left( {\underset{x}{\rightarrow}{{\left( {1 - u} \right) +}\underset{y}{\rightarrow}\sqrt{1 - \left( {1 - u} \right)^{2}}}} \right) \times}\underset{n}{\rightarrow}} \right)}} < 0}}}}} & (10) \\{{{{If}\mspace{14mu}\pi} < \theta < {2\pi}},{\underset{MO}{\rightarrow}{\times {\underset{n}{\rightarrow}{{+ {R\left( {{\left( {\underset{x}{\rightarrow}{{\left( {u - 3} \right) +}\underset{y}{\rightarrow}\sqrt{1 - \left( {u - 3} \right)^{2}}}} \right) \times}\underset{n}{\rightarrow}} \right)}} < 0}}}}} & (11)\end{matrix}$

The range of the trajectory parameter u, that is, the point set U_(i) ofthe arc AB on the inner side of the surface S_(i), is obtained bysolving the inequality (10) and (11).

Referring to FIG. 9, a schematic diagram of determining the position ofany point on the trajectory in the case that the trajectory is aparabola is depicted.

In the case that the trajectory AB corresponding to the obtained data isa parabola, an unit vector which is in the axis direction of theparabola AB is assumed as

and an unit direction vector which is in a same plane and perpendicularto the axis direction is assumed as

and a, b and c are the constants of the parabola AB, the position of thepoint P can be expressed as:

$\begin{matrix}{P = {{u \times}\underset{x}{\rightarrow}{+ \left( {{a\; u^{2}} + {b\; u} + c} \right)}}} & (12)\end{matrix}$

Where, the x in a parabolic equation y=ax²+bx+c is replaced by thetrajectory parameter u, which represents a distance to the point O inthe direction of the horizontal axis.

Furthermore, the point M is a projection point of the point P on thecurved surface S_(i),

is the normal vector of the surface S_(i) pointing to the inner side ofthe specified space area, and

0 passes through the point M.

Therefore, a point set of the parabola AB on a side of the normal vector

that is, the point set U_(i) of the parabola AB on the inner side of thesurface S_(i), is determined based on the first inequality and theformula (12).

Referring to FIG. 10, a schematic diagram of the structure of a machineprocessing trajectory space detecting device according to an embodimentof the present disclosure is depicted. The device 30 includes:

a first obtaining unit 31 configured to obtain the data of thetrajectory AB of the machine processing.

a second obtaining unit 32 configured to obtain the spatial data of thespecified space area.

a converting unit 33 configured to convert the function of the data ofthe trajectory AB obtained by the first obtaining unit 31 into theunivariate function P=f (u) which is with respect to the trajectoryparameter u, where P is any point on the trajectory AB.

a calculating unit 34 configured to determine the spatial data ofindividual curved surfaces S_(i) forming the specified space area basedon the spatial data of the specified space area obtained by the secondobtaining unit 32, and calculate the point set U_(i) of the trajectoryAB on the inner side of each curved surface S_(i) based on the spatialdata of the individual curved surfaces S_(i) and the function P=f (u)produced by the converting unit, where 1≤i≤m, and m is the amount of thecurved surface forming the specified space area.

a position determining unit 35 configured to determine the positionalrelationship between the trajectory AB and the specified space areabased on the point sets U_(i) obtained by the calculating unit 34.

Specifically, the calculating unit 34 is configured to calculate thepoint set U_(i) of the trajectory AB on the inner side of each curvedsurface S_(i) based on the first inequality as follows:

$\underset{PM}{\rightarrow}{\times {\underset{n}{\rightarrow}{< 0}}}$

where, P is any point on the trajectory AB, M is a projection point ofthe point P on the curved surface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M.

The position determining unit 35 is configured to determine theintersection U_(z)=U₁∩U₂ . . . ∩U_(n) of the point sets U_(i) based onthe point sets Ui obtained by the calculating unit 34, and determine thepositional relationship between the trajectory AB and the specifiedspace area based on the relationship between U_(T) and U_(z):

if U_(T)⊂U_(z), the position determining unit 35 determines that thetrajectory AB is on the inner side of the specified space area.

if U_(z)∩U_(T)=ø, the position determining unit 35 determines that thetrajectory AB is completely outside the specified space area.

Where, U_(T) is a set of the point sets of the trajectory AB.

Referring to FIGS. 11 and 12, a schematic diagram of the structure of anumerical control machine is depicted. The numerical control machine 40includes a machine body 41 and a numerical control system 42 installedon the machine body 41. The numerical control system 42 includes amachine processing trajectory space detecting module 43. The machineprocessing trajectory space detecting module 43 includes:

a first obtaining unit 430 configured to obtain the data of thetrajectory AB of the machine processing.

a second obtaining unit 431 configured to obtain the spatial data of thespecified space area.

a converting unit 432 configured to convert the function of the data ofthe trajectory AB obtained by the first obtaining unit 430 into theunivariate function P=f (u) which is with respect to the trajectoryparameter u, where P is any point on the trajectory AB.

a calculating unit 433 configured to determine the spatial data ofindividual curved surfaces S_(i) forming the specified space area basedon the spatial data of the specified space area obtained by the secondobtaining unit 431, and calculate the point set U_(i) of the trajectoryAB on the inner side of each curved surface S_(i) based on the spatialdata of the individual curved surfaces S_(i) and the function P=f (u)produced by the converting unit 432, where 1≤i≤m, and m is the amount ofthe curved surface forming the specified space area;

a position determining unit 434 configured to determine the positionalrelationship between the trajectory AB and the specified space areabased on the point sets U_(i) obtained by the calculating unit 433.

Furthermore, the numerical control system 42 further includes: an alarmmodule 44 configured to issue an alarm information when the positionalrelationship between the trajectory AB and the specified space areadetermined by the machine processing trajectory space detecting module43 does not meet a predetermined safety relationship.

Referring to FIG. 13, a schematic diagram of the structure of a machineprocessing trajectory space detecting device according to anotherembodiment of the present disclosure is depicted. The device 50 in thisembodiment is a terminal, which may be a computer. The device 50includes a receiver 51, a processor 52, a transmitter 53, a read onlymemory 54, a random access memory 55, and a bus 56.

The receiver 51 is configured to receive data.

The processor 52 is configured to control the operation of the device50, which may be a CPU (Central Processing Unit). The processor 52 maybe an integrated circuit chip with signal processing capability. Theprocessor 52 may also be a general purpose processor, a digital signalprocessor (DSP), an application specific integrated circuit (ASIC), afield programmable gate array (FPGA), other programmable logic devices,a discrete gate, a transistor logic device, or a discrete hardwarecomponent. The general purpose processor may be a microprocessor or anyconventional processor.

The transmitter 53 is configured to transmit data.

The memory may include the read-only memory 54 and the random accessmemory 55, and provide instructions and data to the processor 52. Aportion of the memory may also include a nonvolatile random accessmemory (NVRAM).

The components of the device 50 are coupled with each other via the bus56. In addition to data bus, the bus 56 may include a power bus, acontrol bus, and a status signal bus. However, for the sake of clarity,various buses are designated as the bus 56 in the figure.

The memory stores the following elements, executable modules or datastructures, or their subsets or expansion sets:

operation instructions: include a variety of operation instructionsutilized to achieve a variety of operations.

operation system: includes various system programs utilized to implementvarious basic services and handle hardware-based tasks.

In this embodiment, the processor 52 performs the following operationsby calling operation instructions stored in the memory (the operationinstructions can be stored in the operation system):

obtain the data of the trajectory AB of the machine processing.

obtain the spatial data of the specified space area.

convert the function of the data of the trajectory AB into theunivariate function P=f (u) with respect to the trajectory parameter u,where P is any point on the trajectory AB.

determine the point set U_(i) of the trajectory AB on the inner side ofeach curved surface S_(i) based on the spatial data of the individualcurved surfaces S_(i) forming the specified space area and the functionP=f (u), where 1≤i≤m, and m is the amount of the curved surface formingthe specified space area.

determine the positional relationship between the trajectory AB and thespecified space area based on the point sets U_(i).

Optionally, the processor 52 can be configured to utilize the firstinequality as follows to calculate the point set U_(i) of the trajectoryAB on the inner side of each curved surface S_(i):

$\underset{PM}{\rightarrow}{\times {\underset{n}{\rightarrow}{< 0}}}$

Where, P is any point on the trajectory AB, M is a projection point ofthe point P on the curved surface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M.

Optionally, the processor 52 can be configured to obtain theintersection U_(z)=U₁∩U₂ . . . ∩U_(m) of the point sets U_(i):

if U_(T)⊂U_(z), the trajectory AB is determined to be on the inner sideof all the curved surfaces S_(i), thereby determining that thetrajectory AB is on the inner side of the specified space area, whereinU_(T) is a set of the point sets of the trajectory AB.

if U_(z)∩U_(T)=ø, the trajectory AB is determined to be completelyoutside the specified space area. Where, U_(T) is a set of the pointsets of the trajectory AB.

Furthermore, the present disclosure also provides a computer storagemedium. The computer storage medium includes computer program codes. Thecomputer program codes cause a computer processor to execute a machineprocessing trajectory space detecting method when the computer programcodes are executed by the computer processor. The method includes:

obtaining the data of the trajectory AB of the machine processing.

obtaining the spatial data of the specified space area.

converting the function of the data of the trajectory AB into theunivariate function P=f (u) with respect to the trajectory parameter u,where P is any point on the trajectory AB.

determining the point set U_(i) of the trajectory AB on the inner sideof each curved surface S_(i) based on spatial data of the individualcurved surfaces S_(i) forming the specified space area and the functionP=f (u), where 1≤i≤m, and m is the amount of the curved surface formingthe specified space area.

determining the positional relationship between the trajectory AB andthe specified space area based on the point sets U_(i).

The disclosure provides a method, devices, a numerical control machine,and a computer storage medium for detecting machine processingtrajectory space, which express the spatial curve via a univariatefunction so as to participate in the operation of the space area for thecurve, express the point sets of any portion of the trajectory via thetrajectory parameter set, determines the position of the individualcurved surfaces forming the space area and the trajectory, andeventually determine the positions of the space area and the curve.Consequently, the defect of algorithm explosion caused by the spacegeometry operation which needs to analysis the specific area andstraight line type is overcame, which reduces the quantity ofoperations, and has high reusability.

The above description depicts merely some exemplary embodiments of thedisclosure, but the person skilled in the art can make variousmodifications after reading the present disclosure without departingfrom the spirit and scope of the present disclosure.

What is claimed is:
 1. A method for detecting machine processingtrajectory space of numerical control machine, comprising: obtainingdata of a trajectory AB of a machine processing; obtaining spatial dataof a specified space area; converting a function of the data of thetrajectory AB into a univariate function P=f(u) with respect to atrajectory parameter u, wherein P is any point on the trajectory AB;determining a point set U_(i) of the trajectory AB on an inner side ofeach curved surface S_(i) basing on spatial data of the individualcurved surfaces S_(i) forming the specified space area and the functionP=f(u), wherein 1≤i≤m, and m is the amount of the curved surface formingthe specified space area; and determining a positional relationshipbetween the trajectory AB and the specified space area basing on thepoint sets U_(i); wherein the determining the point set U_(i) of thetrajectory AB on the inner side of each curved surface S_(i) basing onspatial data of the individual curved surfaces S_(i) forming thespecified space area and the function P=f(u) comprises: utilizing afirst inequality as follows to calculate the point set U_(i) of thetrajectory AB on the inner side of each curved surface S_(i):${\underset{PM}{\rightarrow}{\times {\underset{n}{\rightarrow}{< 0}}}};$wherein, P is any point on the trajectory AB, M is a proiection point ofthe point P on the curved surface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M; and wherein the determining the positionalrelationship between the trajectory AB and the specified space areabasing on the point sets U_(i) comprises: obtaining the intersectionU_(z)=U₁∩U₂ . . . ∩U_(m) of the point sets U_(i); and determining thatthe trajectory AB is on the inner side of all the curved surfaces S_(i)if U_(T)⊂U_(z), so as to determine that the trajectory AB is on an innerside of the specified space area, wherein U_(T) is a set of the pointsets of the trajectory AB.
 2. The method of claim 1, wherein ifU_(z)∩U_(T)=ø, determining that the trajectory AB is completely outsidethe specified space area.
 3. A machine processing trajectory spacedetecting device of numerical control machine comprising a memory and aprocessor connected to the memory, wherein the processor is configuredto: obtain data of a trajectory AB of a machine processing; obtainspatial data of a specified space area; convert a function of the dataof the trajectory AB into a univariate function P=f(u) with respect to atrajectory parameter u, wherein P is any point on the trajectory AB;determine a point set U_(i) of the trajectory AB on an inner side ofeach curved surface S_(i) basing on spatial data of the individualcurved surfaces S_(i) forming the specified space area and the functionP=f(u), wherein 1≤i≤m, and m is the amount of the curved surface formingthe specified space area; and determine a positional relationshipbetween the trajectory AB and the specified space area basing on thepoint sets U_(i); wherein the processor is further configured to:utilize a first inequality as follows to calculate the point set U_(i)of the trajectory AB on the inner side of each curved surface S_(i):${\underset{PM}{\rightarrow}{\times {\underset{n}{\rightarrow}{< 0}}}};$wherein, P is any point on the trajectory AB, M is a projection point ofthe point P on the curved surface S_(i),

is a normal vector of the curved surface S_(i) pointing to the innerside of the specified space area, and

passes through the point M; and the processor is further configured to:obtain an intersection U_(z)=U₁∩U₂ . . . ∩U_(m) of the point sets U_(i);determine that the trajectory AB is on the inner side of all the curvedsurfaces S_(i) if U_(T)⊂U_(z), so as to determine that the trajectory ABis on an inner side of the specified space area, wherein U_(T) is a setof the point sets of the trajectory AB.
 4. The device of claim 3,wherein the processor is further configured to: determine that thetrajectory AB is completely outside the specified space area ifU_(z)∩U_(T)=ø.